//
// Created by zhangzhiwen on 25-5-23.
//

#include "buzzer.h"
extern int8_t mode;
extern uint8_t color;

void buzzer_init()
{
    ;
}

void buzzer_on(void)
{
    HAL_GPIO_WritePin(BUZZER_PORT, BUZZER_PIN, GPIO_PIN_RESET);
}
void buzzer_off(void)
{
    HAL_GPIO_WritePin(BUZZER_PORT, BUZZER_PIN, GPIO_PIN_SET);
}

void buzzer_play(int Buzz_time,uint8_t Repeat_Time){
    for(int i=0;i<Repeat_Time;i++){
        buzzer_on();
        HAL_Delay(Buzz_time);
        buzzer_off();
        HAL_Delay(200);
    }
}

